package com.dkt.api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

//@SpringBootApplication = @Configuration + @EnableAutoConfiguration + @ComponentScan
@SpringBootApplication
@EnableScheduling // 启用定时器
@EnableAsync // 启用异步调用
public class Application {
	/**
	 * Spring boot程序运行入口
	 * 
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		SpringApplication springApp = new SpringApplication(Application.class);
		//添加各种监听器
		// springApp.addListeners(new ApplicationStartingListener(), new
		// ApplicationEnvironmentPreparedListener(),
		// new ApplicationPreparedListener(), new ApplicationFailedListener());
		springApp.run(args);
	}
}
